<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id = "k">div</div>
<script>

    alert(1)

    let sum = 0
    for (let i = 0; i < 100; i++) {
        sum += i
    }

    alert(sum)
    document.getElementById("k").innerHTML = sum


    alert('end ')


</script>
</body>
</html>